package top.infopub.job.util;


import top.infopub.model.sys.Role;

import java.util.HashMap;
import java.util.Map;

public class DeptUtil {

    private static final Map<String, String> myMap;
    static
    {
        myMap = new HashMap<String, String>();
        myMap.put("投资拓展部", "投资拓展部");
        myMap.put("商务成本部", "商务成本部");
        myMap.put("设计管理部", "设计管理部");
        myMap.put("融资管理部", "融资管理部");
        myMap.put("经理层", "经理层");
        myMap.put("综合人力部", "综合人力部");
        myMap.put("财务资金部", "财务资金部");
        myMap.put("法律事务部", "法律事务部");
        myMap.put("投建管理部", "投建管理部");
        myMap.put("默认角色", "默认角色");
        myMap.put("系统管理员", "系统管理员");

    }

    public  static Role getRoleNameByDept(String deptName){
        Role role=new Role();
        role.setSroleName(myMap.get("默认角色"));
        for(Map.Entry<String, String> entry : myMap.entrySet()){
            String mapKey = entry.getKey();
            String mapValue = entry.getValue();
            if(deptName.indexOf(mapKey)>-1){
                role.setSroleName(mapValue);
                return role;
            }
        }
        return role;
    }

    public static final Map<String, String> pmOrg;
    static
    {
        pmOrg = new HashMap<String, String>();
        pmOrg.put("1007056002", "XMGS000049");
        pmOrg.put("1007057", "QYGS000008");
        pmOrg.put("1007055","QYGS000009");
        pmOrg.put("1007002","QYGS000010");
        pmOrg.put("1007056","QYGS000011");
        pmOrg.put("1007001","QYGS000012");
        pmOrg.put("1007060","QYGS000013");
        pmOrg.put("1007059","QYGS000014");
        pmOrg.put("1007002001","XMGS000007");
        pmOrg.put("1007001003","XMGS000008");
        pmOrg.put("1007","ZBGS000001");
        pmOrg.put("1007011","XMGS000010");
        pmOrg.put("1007005","XMGS000011");
        pmOrg.put("1007046","XMGS000014");
        pmOrg.put("1007026","XMGS000017");
        pmOrg.put("1007049","XMGS000019");
        pmOrg.put("1007035","XMGS000020");
        pmOrg.put("1007027","XMGS000021");
        pmOrg.put("1007022","XMGS000024");
        pmOrg.put("1007048","XMGS000025");
        pmOrg.put("1007061","XMGS000027");
        pmOrg.put("1007029","XMGS000030");
        pmOrg.put("1007009","XMGS000033");
        pmOrg.put("1007021","XMGS000034");
        pmOrg.put("1007008","XMGS000037");
        pmOrg.put("1007043","XMGS000038");
        pmOrg.put("1007037","XMGS000039");
        pmOrg.put("1007039","XMGS000040");
        pmOrg.put("1007001002","XMGS000041");
        pmOrg.put("1007001001","XMGS000042");
        pmOrg.put("1007003","XMGS000043");
        pmOrg.put("1007058","XMGS000044");
        pmOrg.put("1007067","QYGS000015");
        pmOrg.put("1007019","XMGS000009");
        pmOrg.put("1007020","XMGS000012");
        pmOrg.put("1007018","XMGS000013");
        pmOrg.put("1007051","XMGS000015");
        pmOrg.put("1007004","XMGS000016");
        pmOrg.put("1007052","XMGS000018");
        pmOrg.put("1007054","XMGS000022");
        pmOrg.put("1007053","XMGS000023");
        pmOrg.put("1007047","XMGS000026");
        pmOrg.put("1007006","XMGS000028");
        pmOrg.put("1007032","XMGS000029");
        pmOrg.put("1007010","XMGS000031");
        pmOrg.put("1007014","XMGS000032");
        pmOrg.put("1007064","XMGS000035");
        pmOrg.put("1007033","XMGS000047");
        pmOrg.put("1007013","XMGS000048");
    }
}
